b8a952e885a7f54e322eb0c13fbc734a3fd95db5,kie-maven-plugin/src/main/java/org/kie/maven/plugin/BuildMojo.java,BuildMojo,execute,#,44

Before Change


    public void execute() throws MojoExecutionException, MojoFailureException {
        URLClassLoader projectClassLoader = null;
        try {
            projectClassLoader = new URLClassLoader(new URL[]{outputDirectory.toURI().toURL()});
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }

After Change


            for (String element : elements) {
                urls.add(new File(element).toURI().toURL());
            }
            urls.add(outputDirectory.toURI().toURL());

            ClassLoader projectClassLoader = URLClassLoader.newInstance(urls.toArray(new URL[0]),
                                                                        Thread.currentThread().getContextClassLoader());